.data-structure-manager {
  width: 100%;
  min-height: 100vh;
}

/* 导航栏层次样式 - 最高级别 */
.nav-btn-group {
  background: linear-gradient(135deg, #e8f4ff 0%, #b3d9ff 50%, #ffffff 100%);
  padding: 20px 24px !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 20px rgba(24, 144, 255, 0.12), 0 1px 3px rgba(24, 144, 255, 0.08);
  position: relative;
  z-index: 100;
}

.nav-btn-group::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.2), transparent);
}

/* 导航按钮样式重写 */
.nav-btn-group .ant-btn {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(24, 144, 255, 0.2) !important;
  color: #1890ff !important;
  backdrop-filter: blur(10px);
  font-weight: 500 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-btn-group .ant-btn:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(24, 144, 255, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.15) !important;
}

.nav-btn-group .ant-btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #e6f7ff 100%) !important;
  color: #1890ff !important;
  border: 1px solid rgba(24, 144, 255, 0.3) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2) !important;
}

.nav-btn-group .ant-btn-primary:hover {
  background: linear-gradient(135deg, #ffffff 0%, #d6f0ff 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.25) !important;
}

/* 功能栏层次样式 - 次级 */
.header-card {
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(30, 87, 153, 0.08);
  margin-top: 24px;
  position: relative;
  z-index: 50;
  border: 1px solid rgba(230, 240, 255, 0.8);
}

.header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1890ff, #52c41a, #1890ff);
  border-radius: 12px 12px 0 0;
}

.header-card .ant-card-body {
  padding: 20px 24px;
  background: linear-gradient(to bottom, #fafbff, #fff);
}

/* 内容区层次样式 - 最低级别 */
.content-card {
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px rgba(30, 87, 153, 0.04);
  margin-top: 0 !important;
  border: 1px solid rgba(230, 240, 255, 0.6);
  border-top: none;
  position: relative;
  z-index: 10;
}

/* 表格样式 */

.table-row-light {
  background-color: #fff;
}

.table-row-dark {
  background-color: #f0f7ff;
}

.table-row-folder {
  background-color: #f6f9ff;
  font-weight: 500;
}

.table-row-file {
  background-color: #fff;
}

/* 层级样式 - 增强层次感和缩进效果 */
.table-row-level-0 {
  background: linear-gradient(to right, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.03) 70%, transparent 100%) !important;
  border-left: 5px solid #1890ff;
  font-weight: 600;
  position: relative;
}

.table-row-level-0 td:first-child {
  padding-left: 16px !important;
}

.table-row-level-1 {
  background: linear-gradient(to right, rgba(82, 196, 26, 0.06) 0%, rgba(82, 196, 26, 0.02) 70%, transparent 100%) !important;
  border-left: 4px solid #52c41a;
  font-weight: 500;
  position: relative;
}

.table-row-level-1 td:first-child {
  padding-left: 56px !important; /* 基础padding + 40px缩进 */
  position: relative;
}

.table-row-level-1 td:first-child::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent 0%, #1890ff 20%, #1890ff 80%, transparent 100%);
  opacity: 0.3;
}

.table-row-level-1 td:first-child::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  width: 20px;
  height: 2px;
  background: linear-gradient(to right, #1890ff, #52c41a);
  opacity: 0.4;
}

.table-row-level-2 {
  background: linear-gradient(to right, rgba(250, 140, 22, 0.05) 0%, rgba(250, 140, 22, 0.02) 70%, transparent 100%) !important;
  border-left: 3px solid #fa8c16;
  font-weight: 400;
  position: relative;
}

.table-row-level-2 td:first-child {
  padding-left: 96px !important; /* 基础padding + 80px缩进 */
  position: relative;
}

.table-row-level-2 td:first-child::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent 0%, #52c41a 20%, #52c41a 80%, transparent 100%);
  opacity: 0.3;
}

.table-row-level-2 td:first-child::after {
  content: '';
  position: absolute;
  left: 60px;
  top: 50%;
  width: 20px;
  height: 2px;
  background: linear-gradient(to right, #52c41a, #fa8c16);
  opacity: 0.4;
}

.table-row-level-3 {
  background: linear-gradient(to right, rgba(114, 46, 209, 0.04) 0%, rgba(114, 46, 209, 0.02) 70%, transparent 100%) !important;
  border-left: 2px solid #722ed1;
  font-weight: 400;
  position: relative;
}

.table-row-level-3 td:first-child {
  padding-left: 136px !important; /* 基础padding + 120px缩进 */
  position: relative;
}

.table-row-level-3 td:first-child::before {
  content: '';
  position: absolute;
  left: 100px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent 0%, #fa8c16 20%, #fa8c16 80%, transparent 100%);
  opacity: 0.3;
}

.table-row-level-3 td:first-child::after {
  content: '';
  position: absolute;
  left: 100px;
  top: 50%;
  width: 20px;
  height: 2px;
  background: linear-gradient(to right, #fa8c16, #722ed1);
  opacity: 0.4;
}

.table-row-level-4,
.table-row-level-5,
.table-row-level-6 {
  background: linear-gradient(to right, rgba(89, 89, 89, 0.03) 0%, rgba(89, 89, 89, 0.01) 70%, transparent 100%) !important;
  border-left: 1px solid #d9d9d9;
  font-weight: 400;
  position: relative;
}

.table-row-level-4 td:first-child,
.table-row-level-5 td:first-child,
.table-row-level-6 td:first-child {
  padding-left: 176px !important; /* 基础padding + 160px缩进 */
}

/* 层级悬停效果 - 增强版 */
.ant-table-tbody > tr.table-row-level-0:hover > td {
  background: linear-gradient(to right, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.05) 70%, rgba(24, 144, 255, 0.02) 100%) !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.ant-table-tbody > tr.table-row-level-1:hover > td {
  background: linear-gradient(to right, rgba(82, 196, 26, 0.10) 0%, rgba(82, 196, 26, 0.04) 70%, rgba(82, 196, 26, 0.02) 100%) !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.ant-table-tbody > tr.table-row-level-2:hover > td {
  background: linear-gradient(to right, rgba(250, 140, 22, 0.08) 0%, rgba(250, 140, 22, 0.03) 70%, rgba(250, 140, 22, 0.01) 100%) !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.ant-table-tbody > tr.table-row-level-3:hover > td {
  background: linear-gradient(to right, rgba(114, 46, 209, 0.07) 0%, rgba(114, 46, 209, 0.03) 70%, rgba(114, 46, 209, 0.01) 100%) !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.ant-table-tbody > tr.table-row-level-4:hover > td,
.ant-table-tbody > tr.table-row-level-5:hover > td,
.ant-table-tbody > tr.table-row-level-6:hover > td {
  background: linear-gradient(to right, rgba(89, 89, 89, 0.06) 0%, rgba(89, 89, 89, 0.02) 70%, transparent 100%) !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

/* 全局加载样式 */
.global-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 表格节点样式 - 保留原有的奇偶行样式但优先级较低 */

/* 文件夹类型节点的特殊样式增强 */
.ant-table-tbody > tr.table-row-folder > td {
  position: relative;
}

.ant-table-tbody > tr.table-row-folder > td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(24, 144, 255, 0.3), transparent);
}

/* 节点图标样式 */
.nav-container .anticon {
  color: #1890ff;
}

.anticon.anticon-folder {
  color: #faad14;
}

.anticon.anticon-file {
  color: #52c41a;
}

/* 操作按钮样式 */
.ant-btn-text:hover {
  background-color: rgba(24, 144, 255, 0.1);
}

.ant-btn-text.ant-btn-dangerous:hover {
  background-color: rgba(245, 34, 45, 0.1);
}

/* 搜索框样式 */
.ant-input-search {
  border-radius: 6px;
}

.ant-input-search .ant-input {
  border-radius: 6px 0 0 6px;
}

.ant-input-search .ant-btn {
  border-radius: 0 6px 6px 0;
}

/* 抽屉样式 */
.ant-drawer-header {
  background-color: #f0f2f5;
  border-bottom: 1px solid #e8e8e8;
}

.ant-drawer-footer {
  background-color: #f0f2f5;
  border-top: 1px solid #e8e8e8;
}

/* 表单样式 */
.ant-form-item {
  margin-bottom: 16px;
}

.ant-form-item-label > label {
  font-weight: 500;
}

/* 标签样式 */
.ant-tag {
  border-radius: 4px;
  font-size: 12px;
}

/* 层级标签样式增强 */
.level-tag {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.level-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 分页样式 */
.ant-pagination {
  margin-top: 0;
}

.ant-pagination-total-text {
  color: #666;
}

/* 表格展开图标样式 - 层次感增强版 */
.custom-expand-icon {
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.custom-expand-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.custom-expand-icon.expanded {
  background-color: #1890ff;
  color: #fff;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}

.custom-expand-icon.collapsed {
  background-color: #f8f9fa;
  color: #666;
  border: 1px solid #e9ecef;
}

/* Antd展开图标样式增强 */
.ant-table-row-expand-icon {
  border: 1px solid #e6f0ff !important;
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 3px rgba(24, 144, 255, 0.1) !important;
  transition: all 0.3s ease !important;
  width: 18px !important;
  height: 18px !important;
  margin-right: 8px !important;
}

.ant-table-row-expand-icon:hover {
  border-color: #1890ff !important;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2) !important;
}

.ant-table-row-expand-icon.ant-table-row-expanded {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%) !important;
  border-color: #1890ff !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3) !important;
}

.ant-table-row-expand-icon.ant-table-row-expanded:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 3px 10px rgba(24, 144, 255, 0.4) !important;
}

/* 层级相关的展开图标颜色 */
.table-row-level-0 .ant-table-row-expand-icon.ant-table-row-expanded {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%) !important;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3) !important;
}

.table-row-level-1 .ant-table-row-expand-icon.ant-table-row-expanded {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%) !important;
  border-color: #52c41a !important;
  box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3) !important;
}

.table-row-level-2 .ant-table-row-expand-icon.ant-table-row-expanded {
  background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%) !important;
  border-color: #fa8c16 !important;
  box-shadow: 0 2px 8px rgba(250, 140, 22, 0.3) !important;
}

/* 空状态样式 */
.ant-empty {
  padding: 60px 0;
}

.ant-empty-description {
  color: #999;
}

/* 功能栏按钮分组样式 */
.header-card .ant-space {
  gap: 16px !important;
}

.header-card .ant-space > .ant-space-item {
  position: relative;
}

/* 主要操作按钮组 */
.header-card .ant-btn-primary {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
  font-weight: 600;
  transition: all 0.3s ease;
}

.header-card .ant-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.4);
}

.header-card .ant-btn-primary[disabled] {
  background: #d9d9d9;
  transform: none;
  box-shadow: none;
}

/* 次要操作按钮样式 */
.header-card .ant-btn:not(.ant-btn-primary) {
  background: #fff;
  border: 1px solid #e6f0ff;
  color: #1890ff;
  font-weight: 500;
  transition: all 0.3s ease;
}

.header-card .ant-btn:not(.ant-btn-primary):hover {
  background: #f0f7ff;
  border-color: #1890ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(24, 144, 255, 0.15);
}

/* 搜索框增强样式 */
.header-card .ant-input-search {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.header-card .ant-input-search .ant-input {
  border: 1px solid #e6f0ff;
  background: #fafbff;
  transition: all 0.3s ease;
}

.header-card .ant-input-search .ant-input:focus {
  border-color: #1890ff;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.header-card .ant-input-search .ant-btn {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border: none;
  color: #fff;
}

/* 统计标签样式 */
.header-card .ant-tag {
  background: linear-gradient(135deg, #e6f0ff 0%, #f0f7ff 100%);
  border: 1px solid #d6e7ff;
  color: #1890ff;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
}

/* 分隔线样式 */
.header-card .ant-space > .ant-space-item + .ant-space-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, #e6f0ff, transparent);
}

/* 响应式样式 */
@media (max-width: 768px) {
  .nav-btn-group {
    padding: 16px 20px !important;
  }
  
  .nav-btn-group .ant-btn {
    font-size: 14px !important;
    padding: 4px 16px !important;
  }
  
  .header-card {
    margin-top: 16px;
    border-radius: 8px 8px 0 0;
  }
  
  .header-card .ant-card-body {
    padding: 16px 20px;
  }
  
  .header-card .ant-space {
    gap: 12px !important;
  }
  
  .content-card {
    border-radius: 0 0 8px 8px;
  }
  
  .ant-table-wrapper {
    padding: 0 8px 8px;
  }
}

/* 拖拽排序样式 */
.dragging-row {
  background-color: #f0f7ff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: rotate(5deg);
  opacity: 0.9;
  border: 2px solid #1890ff;
  border-radius: 4px;
}

.dragging-row td {
  background-color: #f0f7ff !important;
}

.drag-handle {
  cursor: grab;
  color: #999;
  transition: color 0.2s;
  position: relative;
  z-index: 10;
  padding: 4px !important;
  margin: -4px;
}

.drag-handle:hover {
  color: #1890ff;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle.dragging {
  cursor: grabbing;
  color: #1890ff;
}

/* 拖拽覆盖目标样式 */
.drop-indicator {
  position: relative;
}

.drop-indicator::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #1890ff;
  border-radius: 2px;
  z-index: 1;
}

/* 拖拽时的全局样式 */
.sortable-ghost {
  opacity: 0.4;
}

.sortable-chosen {
  background-color: #e6f7ff !important;
}

/* 同级节点拖拽区域高亮 */
.same-parent-highlight {
  background-color: rgba(24, 144, 255, 0.05) !important;
}

.same-parent-highlight td {
  background-color: rgba(24, 144, 255, 0.05) !important;
}

/* 拖拽禁用状态 */
.drag-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.drag-disabled .drag-handle {
  cursor: not-allowed;
  color: #ccc;
}

/* 拖拽把手动画 */
@keyframes dragPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.drag-handle.dragging {
  animation: dragPulse 0.3s ease-in-out;
}

/* 内联编辑相关样式 */
.inline-edit-cell {
  background-color: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.inline-edit-cell:hover {
  background-color: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
}

.inline-edit-cell:hover::after {
  content: '双击编辑';
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  animation: fadeInTooltip 0.3s ease forwards;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes fadeInTooltip {
  to {
    opacity: 1;
  }
}

.dragging-row .inline-edit-cell {
  pointer-events: none;
}

.dragging-row .inline-edit-cell:hover {
  background-color: transparent;
  border: 1px solid transparent;
}

.dragging-row .inline-edit-cell:hover::after {
  display: none;
} 